Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Promoting sepolia account to admin. #1651

Merged
merged 1 commit into from
Nov 20, 2023

Conversation

StefanIliev545
Copy link
Contributor

@StefanIliev545 StefanIliev545 commented Nov 17, 2023

Why this change is needed

Please provide a description and a link to the underlying ticket

What changes were made as part of this PR

Please provide a high level list of the changes made

PR checks pre-merging

Please indicate below by ticking the checkbox that you have read and performed the required
PR checks

  • PR checks reviewed and performed

Summary by CodeRabbit

  • New Features
    • Enhanced bridge contract with the ability to promote two addresses to admin status for improved management and operational flexibility.

Copy link

coderabbitai bot commented Nov 17, 2023

Walkthrough

The recent update involves a modification to a deployment script for a testnet, specifically for a Layer 1 contract. The script now includes a function call that grants admin privileges to two new addresses within the ObscuroBridge contract. This change is focused on updating administrative controls within the contract's ecosystem.

Changes

File Path Change Summary
.../testnet/layer1/002_add_bridge_admin.ts Added promoteToAdmin function call to grant admin status to two addresses in ObscuroBridge.

🐇 In the code's woven thread, 🍂
Two new guardians now tread. 🛡️
As leaves in fall do softly land,
Admin rights are granted by the coder's hand. ✨


Tips

Chat with CodeRabbit Bot (@coderabbitai)

  • If you reply to a review comment from CodeRabbit, the bot will automatically respond.
  • To engage with CodeRabbit bot directly around the specific lines of code in the PR, mention @coderabbitai in your review comment
  • Note: Review comments are made on code diffs or files, not on the PR overview.
  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Note: For conversation with the bot, please use the review comments on code diffs or files.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Status

Actionable comments generated: 1

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 309b240 and c61b3bc.
Files selected for processing (1)
  • contracts/deployment_scripts/testnet/layer1/002_add_bridge_admin.ts (1 hunks)

Comment on lines 18 to 27
// Deploy a constant supply (constructor mints) erc20
await deployments.execute('ObscuroBridge', {
from: deployer
}, 'promoteToAdmin', '0xE09a37ABc1A63441404007019E5BC7517bE2c43f')
}, 'promoteToAdmin', '0xE09a37ABc1A63441404007019E5BC7517bE2c43f');

await deployments.execute('ObscuroBridge', {
from: deployer
}, 'promoteToAdmin', '0xeC3f9B38a3B30AdC9fB3dF3a0D8f50127E6c2C8f');
};

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes introduce a new administrative function to promote two Ethereum addresses to admin status within the ObscuroBridge contract. Ensure that the addresses '0xE09a37ABc1A63441404007019E5BC7517bE2c43f' and '0xeC3f9B38a3B30AdC9fB3dF3a0D8f50127E6c2C8f' are correct and intended to be granted admin rights. Additionally, confirm that the promoteToAdmin function has been properly tested and audited, especially since it involves privilege escalation which can be a sensitive change in terms of security.

Also, verify that the deployments.execute function has appropriate error handling in case the transaction fails, and consider the implications of transaction ordering, in case these promotions need to occur in a specific sequence or atomic transaction.

Lastly, ensure that the function promoteToAdmin is secure and does not introduce any vulnerabilities, such as the potential for unauthorized privilege escalation, and that its use is compliant with the overall governance and security policies of the project.

Copy link
Contributor

@moraygrieve moraygrieve left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@StefanIliev545 StefanIliev545 merged commit 0b47af6 into main Nov 20, 2023
3 checks passed
@StefanIliev545 StefanIliev545 deleted the siliev/add-other-account-for-testing branch November 20, 2023 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants